package com.fr.report.painter.shape;

import com.fr.base.FRFont;
import com.fr.base.Style;
import com.fr.base.background.Background;
import com.fr.base.core.GraphHelper;
import com.fr.base.xml.XMLPrintWriter;
import com.fr.base.xml.XMLableReader;
import com.fr.report.painter.AbstractPainter;
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.Shape;

public abstract class AbstractShapePainter extends AbstractPainter
  implements ShapePainter
{
  public void paint(Graphics paramGraphics, int paramInt1, int paramInt2, Style paramStyle)
  {
    Graphics2D localGraphics2D = (Graphics2D)paramGraphics;
    if (paramStyle == null)
      paramStyle = Style.DEFAULT_STYLE;
    Shape localShape = getShape(paramInt1 - 1, paramInt2 - 1);
    Background localBackground = paramStyle.getBackground();
    if (localBackground != null)
      localBackground.paint(localGraphics2D, localShape);
    localGraphics2D.setPaint(paramStyle.getFRFont().getForeground());
    GraphHelper.draw(localGraphics2D, localShape);
  }

  public void readXML(XMLableReader paramXMLableReader)
  {
  }

  public void writeXML(XMLPrintWriter paramXMLPrintWriter)
  {
  }

  public Object clone()
    throws CloneNotSupportedException
  {
    return super.clone();
  }
}